﻿using System;
using System.Collections.Generic;
using System.Text;
using AspNetCs.IDAL;
using AspNetCs.DALFactory;
using AspNetCs.Model;
using System.Data;
using AspNetCs.Enumerations.AddPoint_Enum;
namespace AspNetCs.Bll
{
    public class AddPoint
    {
        private IAddPoint point = Conn.CreateAddPoint();

        #region IAddPoint 成员

        public int Add(AddPoint_Model model)
        {
            if (model == null) return -1;
            return point.Add(model);
        }

        public int Del(int id)
        {
            return point.Del(id);
        }
        public AddPoint_Model GetModel(int id)
        {
            return point.GetModel(id);
        }

        #endregion

        public static string EnumStr(int state)
        {
            string Result = "";
            switch (state)
            {
                case (int)Point_state.NoUse:
                    Result = "未使用";
                    break;

                case (int)Point_state.YesUse:
                    Result = "已使用";
                    break;
            }

            return Result;
        }
        



    }
}
